﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Guia.Core;
using Guia.Elements;
using NUnit.Framework;
using System.Windows.Automation;
using WpfTestApplication;

namespace NUnitTests{
    [TestFixture]
    public class RadioButtonTest : AbstractWindowTest
    {
        public RadioButtonTest()
        {
        }

        protected override Type TestWindowType()
        {
            return typeof(RadioButtonTestWindow);
        }

        protected override string TestWindowName()
        {
            return "RadioButtonTestWindow";
        }

        [Test]
        public void TestSelect()
        {
            RadioButton radioButton1 = window.Get<RadioButton>("radioButton1");
            RadioButton radioButton2 = window.Get<RadioButton>("radioButton2");
            radioButton1.Select();
            Assert.AreEqual(true, radioButton1.IsSelected);
            Assert.AreEqual(false, radioButton2.IsSelected);
            radioButton2.Select();
            Assert.AreEqual(false, radioButton1.IsSelected);
            Assert.AreEqual(true, radioButton2.IsSelected);
        }
    }
}
